package cn.sunxyz.behavior.state;

/**
 * Created by yangrd on 2017/5/15.
 */
public class Context {

    private State state;

    public Context(State state) {
        this.state = state;
    }

    public void method() {
        if (state.getValue().equals("1")) {
            state.method1();
        } else if (state.getValue().equals("2")) {
            state.method2();
        }
    }
}
